/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Refill Pharmacy Supply Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * specDomain: S16215 (C-0-T13953-A13954-A16208-S16215-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getRefillPharmacySupplyType()
 * @model extendedMetaData="name='RefillPharmacySupplyType'"
 * @generated
 */
public enum RefillPharmacySupplyType implements Enumerator {
	/**
	 * The '<em><b>RF</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RF_VALUE
	 * @generated
	 * @ordered
	 */
	RF(0, "RF", "RF"),

	/**
	 * The '<em><b>DF</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DF_VALUE
	 * @generated
	 * @ordered
	 */
	DF(1, "DF", "DF"),

	/**
	 * The '<em><b>RFF</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RFF_VALUE
	 * @generated
	 * @ordered
	 */
	RFF(2, "RFF", "RFF"),

	/**
	 * The '<em><b>RFC</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RFC_VALUE
	 * @generated
	 * @ordered
	 */
	RFC(3, "RFC", "RFC"),

	/**
	 * The '<em><b>RFP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RFP_VALUE
	 * @generated
	 * @ordered
	 */
	RFP(4, "RFP", "RFP"),

	/**
	 * The '<em><b>TB</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TB_VALUE
	 * @generated
	 * @ordered
	 */
	TB(5, "TB", "TB"),

	/**
	 * The '<em><b>UD</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #UD_VALUE
	 * @generated
	 * @ordered
	 */
	UD(6, "UD", "UD");

	/**
	 * The '<em><b>RF</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RF</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RF
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RF_VALUE = 0;

	/**
	 * The '<em><b>DF</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>DF</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #DF
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int DF_VALUE = 1;

	/**
	 * The '<em><b>RFF</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RFF</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RFF
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RFF_VALUE = 2;

	/**
	 * The '<em><b>RFC</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RFC</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RFC
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RFC_VALUE = 3;

	/**
	 * The '<em><b>RFP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RFP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RFP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RFP_VALUE = 4;

	/**
	 * The '<em><b>TB</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>TB</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TB
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int TB_VALUE = 5;

	/**
	 * The '<em><b>UD</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>UD</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #UD
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int UD_VALUE = 6;

	/**
	 * An array of all the '<em><b>Refill Pharmacy Supply Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final RefillPharmacySupplyType[] VALUES_ARRAY =
		new RefillPharmacySupplyType[] {
			RF,
			DF,
			RFF,
			RFC,
			RFP,
			TB,
			UD,
		};

	/**
	 * A public read-only list of all the '<em><b>Refill Pharmacy Supply Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<RefillPharmacySupplyType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Refill Pharmacy Supply Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RefillPharmacySupplyType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			RefillPharmacySupplyType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Refill Pharmacy Supply Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RefillPharmacySupplyType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			RefillPharmacySupplyType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Refill Pharmacy Supply Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RefillPharmacySupplyType get(int value) {
		switch (value) {
			case RF_VALUE: return RF;
			case DF_VALUE: return DF;
			case RFF_VALUE: return RFF;
			case RFC_VALUE: return RFC;
			case RFP_VALUE: return RFP;
			case TB_VALUE: return TB;
			case UD_VALUE: return UD;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private RefillPharmacySupplyType(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //RefillPharmacySupplyType
